const config = require('../config.js');
var mysql = require('mysql');

function connect() {
  var connection = mysql.createConnection({
    host: config.DB_HOST,
    port: config.DB_PORT,
    user: config.DB_USER,
    password: config.DB_PWD,
    database: config.DB_NAME
  });
  connection.connect();
  return connection;
}

function queryAll(tbale, callback) {}

const sqlhelper = {
  getConnection: connect
}

module.exports = sqlhelper;